package com.itqf.beanfactory;

import com.itqf.controller.UserController;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * projectName: springframeworkgp8
 *
 * @author: 赵伟风
 * time: 2021/8/2 14:49
 * description:
 */
public class userlogin {


    public static void main(String[] args) {


        //1.创建一个容器
        ClassPathXmlApplicationContext
                applicationContext = new ClassPathXmlApplicationContext("spring_ioc.xml");
        //2.获取controller
        UserController userController = applicationContext.getBean(UserController.class);

        //3.调用即可

        userController.login("root", "root");


        applicationContext.close();

    }
}
